import { fetchRegionGeo } from '@/services/house';
const HouseModel = {
  namespace: 'houseCommon',
  state: {
    regionGeo: []
  },
  effects: {
    *fetchRegionGeo({payload}, { call, put }) {
      const response = yield call(fetchRegionGeo, payload);
      yield put({
        type: 'saveRegionGeo',
        payload: response,
      });
    }
  },
  reducers: {
    saveRegionGeo(state, action) {
      return { ...state, regionGeo: action.payload || [] };
    }
  }
};
export default HouseModel;
